package com.momo.hr.util;


import com.momo.hr.bean.Hr;
import org.springframework.security.core.context.SecurityContextHolder;

/**
 * 从SpringSecurity获取当前的用户信息
 */
public class HrUtils {

    public static Hr getCurrentHr(){
        return (Hr)SecurityContextHolder.getContext().getAuthentication().getPrincipal();
    }
}
